package com.fjec.devops.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjec.common.jxls.ExchangeGiftExcel;
import com.fjec.common.protocol.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

@FeignClient(name = "activity-serv")
public interface ActivityClient {

    @RequestMapping(method = RequestMethod.GET, value = "/api/gift/giftChangeRecords")
    Map<String, Object> giftChangeRecords(@RequestParam("searchBy") Integer searchBy,
                                          @RequestParam("title") String title,
                                          @RequestParam("busiType") Integer busiType,
                                          @RequestParam("opeType") Integer opeType,
                                          @RequestParam("startTime") String startTime,
                                          @RequestParam("endTime") String endTime,
                                          @RequestParam("page") Long page,
                                          @RequestParam("limit") Long limit);

    /**
     * 用户兑换礼物数据列表
     *
     * @param page
     * @param searchBy  店铺名
     * @param condition  店铺名
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET, value = "/api/user/gift/exchange/page")
    Map<String, Object> getExchangeGiftPage(@RequestParam long page,
                                            @RequestParam long limit,
                                            @RequestParam Integer searchBy,
                                            @RequestParam(required = false) String condition,
                                            @RequestParam(required = false) String startTime,
                                            @RequestParam(required = false) String endTime
    );

    /**
     * 根据时间获取当天的用户兑换申请
     *
     * @param date
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = "/api/exchange/gift/for/excel")
    List<ExchangeGiftExcel> getExchangeGiftForExcel(@RequestParam String date);
}
